package org.demo.controller;

import org.demo.config.ThreadConfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/pod")
public class ExcelExporterController {
    @Autowired
    private ThreadConfig threadConfig;

    @RequestMapping("/test1")
    public void test() {
        for (int i = 0; i <= 100; i++) {
            threadConfig.executor().execute(this::a);
        }
    }

    public void a() {
        System.out.println("线程-" + Thread.currentThread().getId() + "在执行写入");
    }
}